# coding=utf8
from django.db import models
from django.contrib.auth.models import User

# Create your models here.
class Event(models.Model):
    title = models.CharField(max_length=100, verbose_name="标题")
    content = models.TextField()
    creator = models.ForeignKey(User, verbose_name="发起人")
    created = models.DateTimeField(auto_now_add=True, verbose_name="创建时间")
    updated = models.DateTimeField(auto_now=True, verbose_name="更新时间")

    class meta():
        verbose_name = ""

class Vite(models.Model):
    sender = models.ForeignKey(User, verbose_name="转发者", related_name='sender')
    last_sender = models.ForeignKey(User, verbose_name="Last Sender", related_name='last_sender')
    code = models.CharField(max_length=18)
    event = models.ForeignKey(Event)
